// function doubleAfter2seconds(num) {
//   console.log('c')
//   return new Promise((resolve, reject) => {
//     console.log(3)
//       setTimeout(() => {
//           // resolve(2 * num)
//           // resolve('A')
//           console.log('a')
//       }, 200);
//       resolve('b')
//   } )
// }
// setTimeout(() => {
//   console.log(5)
// }, 300)
// async function testResult() {
//   console.log(4)
//   let result = await doubleAfter2seconds(30);
//   console.log(result);
// }
// console.log(1)
// testResult();
// console.log(2)
async  function  async1 ()  {
  console.log('async1 start');
  await  async2();
  console.log('async1 end')
}
async  function  async2 ()  {
  console.log('async2')
}
console.log('script start');
setTimeout(function ()  {
  console.log('setTimeout')
},  0);
async1();
new  Promise(function (resolve)  {
  console.log('promise1');
  resolve()
}).then(function ()  {
  console.log('promise2')
});
console.log('script end')

